import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'app-search-button',
  templateUrl: './search-button.component.html',
  styleUrl: './search-button.component.less'
})
export class SearchButtonComponent {
  @Input() search = false;
  @Input() reset = false;
  @Input() create = false;

  @Output() searchEvent = new EventEmitter<boolean>(true);
  @Output() resetEvent = new EventEmitter<boolean>(true);
  @Output() createEvent = new EventEmitter<boolean>(true);

  onSearch() {
    this.searchEvent.emit(true);
  }

  onReset() {
    this.resetEvent.emit(true);
  }

  onAdd() {
    this.createEvent.emit(true);
  }

}
